package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendShiftScheduleCycleAddDTO;
import org.jsola.hr.dto.AttendShiftScheduleCycleUpdateDTO;
import org.jsola.hr.query.AttendShiftScheduleCycleQuery;
import org.jsola.hr.vo.AttendShiftScheduleCycleListVO;
import org.jsola.hr.vo.AttendShiftScheduleCycleVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-排班周期")
public interface IAttendShiftScheduleCycleControllerAPI {

    /**
     * 新增排班周期
     * @param attendShiftScheduleCycleAddDTO 排班周期新增实体
     * @return 排班周期展示对象
     */
    @ApiOperation(value = "新增排班周期")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftScheduleCycleAddDTO", dataType = "AttendShiftScheduleCycleAddDTO", value = "新增排班周期", paramType = "body")
    })
    Result<AttendShiftScheduleCycleVO> save(AttendShiftScheduleCycleAddDTO attendShiftScheduleCycleAddDTO);


    /**
     * 修改排班周期
     * @param attendShiftScheduleCycleUpdateDTO 排班周期
     * @return 更新数量
     */
    @ApiOperation(value = "修改排班周期")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftScheduleCycleUpdateDTO", dataType = "AttendShiftScheduleCycleUpdateDTO", value = "修改排班周期", paramType = "body")
    })
    Result<Integer> update(AttendShiftScheduleCycleUpdateDTO attendShiftScheduleCycleUpdateDTO);

    /**
     * 删除单个排班周期，彻底删除
     * @param attendShiftScheduleCycleId 排班周期id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个排班周期，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftScheduleCycleId", dataType = "String", value = "排班周期id", paramType = "path")
    })
    Result<Integer> delete(String attendShiftScheduleCycleId);


    /**
     * 批量删除排班周期，彻底删除
     * @param attendShiftScheduleCycleIds 排班周期id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除排班周期，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftScheduleCycleIds", dataType = "String[]", value = "排班周期id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendShiftScheduleCycleIds);


    /**
     * 根据排班周期id查询排班周期详情
     * @param attendShiftScheduleCycleId 排班周期id
     * @return 排班周期详情
     */
    @ApiOperation(value="根据排班周期id查询排班周期详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftScheduleCycleId", dataType = "String", value = "排班周期id", paramType = "path")
    })
    Result<AttendShiftScheduleCycleVO> findById(String attendShiftScheduleCycleId);


    /**
     * 查询排班周期
     * @param attendShiftScheduleCycleQuery 排班周期查询参数
     * @return page
     */
    @ApiOperation(value="查询排班周期")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftScheduleCycleQuery", dataType = "AttendShiftScheduleCycleQuery", value = "排班周期查询参数", paramType = "query")
    })
    Result<List<AttendShiftScheduleCycleListVO>> listAll(AttendShiftScheduleCycleQuery attendShiftScheduleCycleQuery);


     /**
     * 分页查询排班周期
     * @param attendShiftScheduleCycleQuery 排班周期查询参数
     * @return page
     */
    @ApiOperation(value="分页查询排班周期")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendShiftScheduleCycleQuery", dataType = "AttendShiftScheduleCycleQuery", value = "排班周期查询参数", paramType = "query")
    })
    Result<Page<AttendShiftScheduleCycleListVO>> page(AttendShiftScheduleCycleQuery attendShiftScheduleCycleQuery);


}

